package bjtuoj;

import java.util.Scanner;

/**
 * ClassName: Homework_3_D
 * Description:
 * date: 2021-11-09 9:57
 *
 * @author liyifan
 */
public class Homework_3_D {
    public static void main(String[] args) {
        int[][] horse = {{1, 2}, {1, -2}, {-1, 2}, {-1, -2}, {2, 1}, {2, -1}, {-2, 1}, {-2, -1}};
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            boolean[][] map = new boolean[20][20];
            int[][] dp = new int[20][20];
            int target_x = scanner.nextInt() + 1;
            int target_y = scanner.nextInt() + 1;
            int x = scanner.nextInt() + 1;
            int y = scanner.nextInt() + 1;
            map[x][y] = true;
            for (int i = 0;i < 8;i++) {
                if (x + horse[i][0] >= 0 && y + horse[i][1] >= 0) {
                    map[x + horse[i][0]][y + horse[i][1]] = true;
                }
            }
            dp[1][1] = 1;
            for (int i = 1; i <= target_x;i++) {
                for (int j = 1;j <= target_y;j++) {
                    if (!map[i][j]) {
                        dp[i][j] += (dp[i - 1][j] + dp[i][j - 1]);
                    }
                }
            }

            System.out.printf("%d\n", dp[target_x][target_y]);
        }
    }
}
